GetFPS

Syntax

Screen:GetFPS(return)

Description

Retrieves the current FPS.

Note

Use this if you want to limit the FPS and make something like:

/*
1. get FPS
2. if FPS is more than 24, slow down the rendering speed with Konsol:Delay
3. if FPS is below 15, skip other animation frames to keep up with the desired speed
*/

Example

Var:Number myFPS;
function main() {
  Screen:Show()
 
  while (B1 EQ false) {
    Screen:GetFPS(myFPS)
 
    Screen:PrintString("frames/second is " + myFPS)
 
    Screen:Render()  //update the screen (with nothing :D)
  }
}
www.konsolscript.org
© 2005-2011 KonsolScript Labs | All Rights Reversed | Licensed under GNU GPL | Designed by Mj Mendoza IV
http://www.sourceforge.net